#ifndef _ASYN_SOCKET_H_
#define _ASYN_SOCKET_H_



interface ISocket : public IIoDevice
{
	std_method_(os_sock_t, GetSocket)()							= 0;
	std_method(BindSocket)(os_sock_t sock)						= 0;
};
_DEFINE_IID(ISocket, "{B3F9D677-0489-4B9D-B2FB-E48F6B0E2E68}");



interface ITcpSocket : public ISocket
{
	std_method(SetReuseAddr)(bool bstart)						= 0;
	std_method(SetNoDelay)(bool bstart)							= 0;
	std_method(SetLinger)(bool bstart)							= 0;
	std_method(SetKeepalive)(bool bstart)						= 0;
	std_method(SetCork)(bool bstart)							= 0;
	std_method(SetNoSigPipe)(bool bstart)						= 0;
	std_method(SetNonblock)(bool bstart)						= 0;
	std_method(SendBufLen)(ULONG size)							= 0;
	std_method(RecvBufLen)(ULONG size)							= 0;
	std_method(SendTimeOut)(int sec)							= 0;
	std_method(RecvTimeOut)(int sec)							= 0;
	std_method(ConnectTimeOut)(int sec)							= 0;
	std_method(SendLoWat)(int size)								= 0;
	std_method(RecvLoWat)(int size)								= 0;
};
_DEFINE_IID(ITcpSocket, "{6F7C433A-D7C5-4EFB-A525-701A675D7388}");

interface IAsyncTcpSocket : public ITcpSocket
{

};

_DEFINE_IID(IAsyncTcpSocket, "{6F7C433A-D7C5-4EFB-A525-701A675D7389}");


interface IUdpSocket : public ISocket
{

};
_DEFINE_IID(IUdpSocket, "{011A712D-1CD0-4F01-B365-35CB79AABBC6}");




interface IAsyncUdpSocket : public ISocket
{

};
_DEFINE_IID(IAsyncUdpSocket, "{AD708F28-58CB-46CE-A672-A16662944D8A}");


#endif